require 'rubygems'
require 'rake/clean'

$compiler='gcc'
$goal="agilelamp"

SRC = FileList['*.cpp']
OBJ = SRC.ext('o')

CLEAN.include(['*.o', '*.a'])
CLOBBER.include("build/*")

task :default => [$goal]

rule '.o' => ['.cpp'] do |t|
  sh "#{$compiler} -c -o #{t.name} #{t.source}"
end

file $goal => OBJ do
  sh "#{$compiler} -o #{$goal} #{OBJ}"
end
